package com.wc.alorithm_luogu.P8786_李白打酒加强版;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 * @Author congege
 * @Description
 * @Date Created in 2024/2/4-20:52
 */
public class Main {
    static FastReader sc = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);
    static int N = 110;
    // f[i][j][k]表示走了i步，碰到j次花，酒的状态是k的方案数目
    static int[][][] f = new int[N << 1][N][N];
    static int P = (int) 1e9 + 7;
    static int n, m;

    public static void main(String[] args) {
        f[0][0][2] = 1;
        n = sc.nextInt();
        m = sc.nextInt();
        for (int i = 0; i < n + m; i++) {
            for (int j = 0; j < m; j++) {
                for (int k = 0; k <= m; k++) {
                    if (f[i][j][k] != 0) {
                        // 当有酒的时候才能喝酒
                        if (k > 0) f[i + 1][j + 1][k - 1] = (f[i + 1][j + 1][k - 1] + f[i][j][k]) % P;
                        // 酒的状态最多是100，下面是遇到了店
                        if (k <= 50) f[i + 1][j][k * 2] = (f[i + 1][j][k * 2] + f[i][j][k]) % P;
                    }
                }
            }
        }
        out.println(f[n + m][m][0]);
        out.flush();
    }
}


class FastReader {
    StringTokenizer st;
    BufferedReader br;

    FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    String nextLine() {
        String s = "";
        try {
            s = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return s;
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    boolean hasNext() {
        while (st == null || !st.hasMoreElements()) {
            String s = nextLine();
            if (s == null) {
                return false;
            }
            st = new StringTokenizer(s);
        }

        return true;
    }
}